<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="box">
        <div class="inner-box">

        </div>
    </div>
    <ul class="nav">
        <li class="nav-item active">li1</li>
        <li class="nav-item">li2</li>
        <li class="nav-item">li3</li>
        <li class="nav-item">li4</li>
        <li class="nav-item">li5</li>
        <li class="nav-item">li6</li>
    </ul>


    <script>
        // 获取事件源
        var inner = document.querySelector('.box .inner-box');
        console.log(inner);
        var li = document.querySelector('.nav-item.active');
        console.log(li);
        
    </script>
</body>
</html>